<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Authority</title>
    <link rel="stylesheet" href="../../public/css/weui.css"/>
    <link rel="stylesheet" href="../../public/js/jquery-2.1.4.js">
    <!-- 自适应移动端 -->
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
</head>
<body>
<div class="page">
    <div class="weui-form">
        <div class="weui-form__text-area">
            <h2 class="weui-form__title">管理员注册</h2>
            <div class="weui-form__desc"></div>
        </div>
        <div class="weui-form__control-area">
            <div class="weui-cells__group weui-cells__group_form">
                <div class="weui-cells__title"></div>
                <div class="weui-cells weui-cells_form">
                    <div class="weui-cell">
                        <div class="weui-cell__hd"><label class="weui-label">账户名</label></div>
                        <div class="weui-cell__bd">
                            <input id="username" class="weui-input" placeholder="填写本人微信号/手机号"/>
                        </div>
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__hd"><label class="weui-label">公司/学校/团队</label></div>
                        <div class="weui-cell__bd">
                            <input id="team" class="weui-input" placeholder="填写公司/学校/团队名称"/>
                        </div>
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__hd"><label class="weui-label">密码</label></div>
                        <div class="weui-cell__bd weui-cell_primary">
                            <input id="pass1" type="password" class="weui-input" placeholder="不少于6位" />
                        </div>
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__hd"><label class="weui-label">确认密码</label></div>
                        <div class="weui-cell__bd weui-cell_primary">
                            <input id="pass2" type="password" class="weui-input" placeholder="不少于6位" />
                        </div>
                    </div>
                    <script>

                        // result =sha1(md5(rand)+pass)
                    </script>
                    <!-- <div class="weui-cell">
                        <div class="weui-cell__hd"><label class="weui-label">联系电话</label></div>
                        <div class="weui-cell__bd">
                            <input id="cellphone" class="weui-input" placeholder="填写绑定的电话号码" type="number" pattern="[0-9]*" />
                        </div>
                    </div> -->
                </div>
            </div>
        </div>
        <div class="weui-form__tips-area">
            <p class="weui-form__tips"></p>
        </div>
        <div class="weui-form__opr-area">
            <!-- class中添加weui-btn_disabled可以将button隐藏 -->
            <a class="weui-btn weui-btn_primary" href="javascript:void(0)" onclick="submit()"  id="showTooltips">注册</a>
        </div>
        <div class="weui-form__tips-area">
            <p class="weui-form__tips"></p>
        </div>
        <div class="weui-form__extra-area">
            <div class="weui-footer">
                <p class="weui-footer__links">
                    <a href="javascript:" class="weui-footer__link">返回主页</a>
                </p>
                <p class="weui-footer__text">Copyright © 20xx-2020 xxxx</p>
            </div>
        </div>
    </div>
    <div id="js_toast" style="display: none;">
        <div class="weui-mask_transparent"></div>
        <div class="weui-toast">
            <i class="weui-icon-success-no-circle weui-icon_toast"></i>
            <p class="weui-toast__content">已完成</p>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function(){
        var $toast = $('#js_toast');
        var $input = $('#js_input');
        $input.on('input', function(){
            if ($input.val()){
                $('#showTooltips').removeClass('weui-btn_disabled');
            }else{
                $('#showTooltips').addClass('weui-btn_disabled');
            }
        });
        $('#showTooltips').on('click', function(){
            if ($(this).hasClass('weui-btn_disabled')) return;

            // toptips的fixed, 如果有`animation`, `position: fixed`不生效
            $('.page.cell').removeClass('slideIn');

            $toast.fadeIn(100);
            setTimeout(function () {
                $toast.fadeOut(100);
            }, 2000);
        });
    });
</script>
</body>
</html>